/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.util.Map;
/*     */ import java.util.concurrent.ConcurrentHashMap;
/*     */ import java.util.concurrent.CopyOnWriteArrayList;
/*     */ import java.util.regex.Pattern;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.item.ItemStack;
/*     */ import org.lwjgl.input.Keyboard;
/*     */ import org.yaml.snakeyamla.configuration.file.YamlConfiguration;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class dha
/*     */ {
/*  19 */   public static dha t = new dha();
/*  20 */   private CopyOnWriteArrayList<fba> d = new CopyOnWriteArrayList<>();
/*  21 */   private CopyOnWriteArrayList<eos/moe/dragoncore/gla> z = new CopyOnWriteArrayList<>();
/*  22 */   private Map<String, YamlConfiguration> i = new ConcurrentHashMap<>();
/*     */   
/*     */   public fba v(ItemStack itemStack) {
/*  25 */     if (itemStack.func_190926_b()) return null;
/*     */     
/*  27 */     String str = ve.v(itemStack, false, false);
/*  28 */     for (fba fba : this.d) {
/*  29 */       if (fba.v() && 
/*  30 */         ja.v(fba.q, str)) {
/*  31 */         return fba;
/*     */       }
/*     */     } 
/*     */     
/*  35 */     return null;
/*     */   }
/*     */   
/*  38 */   private ItemStack w = null;
/*  39 */   public vh q = null;
/*  40 */   private eos/moe/dragoncore/gla g = null;
/*     */ 
/*     */   
/*     */   public boolean v(String str) {
/*  44 */     return v(str, wn.x);
/*     */   }
/*     */   
/*     */   public boolean v(String str, wn wn1) {
/*  48 */     if (this.q != null) {
/*  49 */       this.q.ka = str;
/*  50 */       boolean bool = this.q.runGuiAction(wn1);
/*  51 */       this.q.ka = "";
/*  52 */       return bool;
/*     */     } 
/*  54 */     return false;
/*     */   }
/*     */   
/*     */   public boolean v() {
/*  58 */     if (this.q != null) {
/*  59 */       return this.q.runGuiAction(wn.p);
/*     */     }
/*  61 */     return false;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public vh v(ItemStack itemStack) {
/*  72 */     if (itemStack.func_190926_b() || !ItemStack.func_77989_b(itemStack, this.w) || (this.g != null && !this.g.v())) {
/*  73 */       if (this.q != null)
/*  74 */         this.q.onGuiClosed1(); 
/*  75 */       this.q = null;
/*  76 */       this.w = itemStack;
/*  77 */       this.g = null;
/*     */     } 
/*  79 */     if (this.q != null)
/*  80 */       return this.q; 
/*  81 */     if (this.w.func_190926_b()) {
/*  82 */       return null;
/*     */     }
/*     */     
/*  85 */     String str = ve.v(itemStack, false, false);
/*  86 */     for (eos/moe/dragoncore/gla eos/moe/dragoncore/gla1 : this.z) {
/*  87 */       String str1 = eos/moe/dragoncore/gla.v(eos/moe/dragoncore/gla1);
/*     */       
/*  89 */       if (str1 != null && (str.contains(str1) || ja.v(eos/moe/dragoncore/gla.v(eos/moe/dragoncore/gla1), str)) && eos/moe/dragoncore/gla1.v()) {
/*  90 */         this.g = eos/moe/dragoncore/gla1;
/*     */         
/*  92 */         this
/*  93 */           .q = new vh(str, eos/moe/dragoncore/gla.v(eos/moe/dragoncore/gla1), this.i, (Minecraft.func_71410_x()).field_71439_g.field_71069_bz, vh.eos/moe/dragoncore/ng.w);
/*  94 */         this.q.initGui_();
/*     */         
/*  96 */         return this.q;
/*     */       } 
/*     */     } 
/*     */ 
/*     */     
/* 101 */     return null;
/*     */   }
/*     */   
/*     */   public void v() {
/* 105 */     if (this.q != null)
/* 106 */       this.q.onGuiClosed1(); 
/* 107 */     this.q = null;
/* 108 */     this.g = null;
/*     */   }
/*     */   
/*     */   public CopyOnWriteArrayList<fba> z() {
/* 112 */     return this.d;
/*     */   }
/*     */   
/*     */   public CopyOnWriteArrayList<eos/moe/dragoncore/gla> v() {
/* 116 */     return this.z;
/*     */   }
/*     */ 
/*     */   
/*     */   public Map<String, YamlConfiguration> v() {
/* 121 */     return this.i;
/*     */   }
/*     */   
/*     */   public static class eos/moe/dragoncore/gla {
/*     */     private String z;
/*     */     private Pattern i;
/*     */     private int w;
/*     */     private YamlConfiguration q;
/*     */     private int g;
/*     */     
/*     */     public eos/moe/dragoncore/gla(YamlConfiguration yamlConfiguration) {
/* 132 */       this.q = yamlConfiguration;
/* 133 */       this.z = yamlConfiguration.getString("match", "unknown").replace("&", "§");
/* 134 */       this.w = yamlConfiguration.getInt("priority", 0);
/* 135 */       this.g = yamlConfiguration.getInt("shiftType");
/* 136 */       if (this.z.equals("*")) {
/* 137 */         this.z = ".*";
/*     */       }
/* 139 */       this.i = Pattern.compile(this.z);
/*     */     }
/*     */ 
/*     */     
/*     */     public boolean v() {
/* 144 */       boolean bool = (Keyboard.isKeyDown(42) || Keyboard.isKeyDown(54));
/*     */       
/* 146 */       if (this.g == 1 && bool) {
/* 147 */         return false;
/*     */       }
/* 149 */       if (this.g == 2 && !bool) {
/* 150 */         return false;
/*     */       }
/* 152 */       return true;
/*     */     }
/*     */     
/*     */     public int v() {
/* 156 */       return this.w;
/*     */     }
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\dha.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */